/*
 * @Author: long
 * @Date: 2021-01-07 18:28:14
 * @LastEditTime: 2021-11-09 16:48:20
 * @LastEditors: Please set LastEditors
 * @Description: 全局公用api地址
 * @FilePath: \tracking-Pluse:\hjimi\人脸辨识云\html\face-recognition-access\src\api\article.js
 */
import request from '@/utils/request'

const RESOURCE = 'api/v1/charge/api/'

// 公用代理地址
let proxyUrl = 'http://www.hjimi.com'
export { proxyUrl as  proxyUrl_1}

/**
 * @description: 获取人脸图片
 * @param {string} target
 * @param {string} imgId
 */
export function getFaceImage(target, imgId) { return `_api/api/v1/person/person-images?imageId=` }

// =========================================== 服务与资源相关 ==================================================
/**
 * @description: 服务导航列表
 */
export function allNavService() { return request({ url: `${ RESOURCE }service/nav`, method: 'GET' })}

/**
 * @description: 所有资源列表
 */
 export function allResources() { return request({ url: `${ RESOURCE }nav/resource`, method: 'GET' })}

 /**
 * @description: 资源分组及资源列表
 * @param {string} chargeType 可选值：QPS/quantity
 * @param {number} serviceId
 */
  export function groupResourceList(chargeType, serviceId) { return request({ url: `${ RESOURCE }nav/group-resource?chargeType=${ chargeType }&serviceId=${ serviceId }`, method: 'GET' })}

/**
 * @description: 所有服务及资源列表
 */
// export function allServiceAssignResources() { return request({ url: `${ RESOURCE }nav/service-resource`, method: 'GET' })}

/**
 * @description: 指定服务下的资源列表
 * @param {number} id
 */
export function serviceAssignResources(id) { return request({ url: `${ RESOURCE }nav/service/${ id }/resources`, method: 'GET' })}
